package net.wangds.dymodel.meta.repo.db;

import net.wangds.data.RemovedEnum;
import net.wangds.dymodel.meta.entity.DyModelPropDefEntity;
import net.wangds.jpa.repository.RemovableRepo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * .
 * <p></p>
 *
 * @author 王东石 2021/2/15 20:30.
 */
@Repository
public interface DyModelPropDefRepo extends RemovableRepo<DyModelPropDefEntity> {

   List<DyModelPropDefEntity> findByDyModelId(String dyModelId, Sort sort);
   List<DyModelPropDefEntity> findByDyModelIdAndRemoved(String dyModelId, RemovedEnum removed, Sort sort);
   Page<DyModelPropDefEntity> findByDyModelId(String dyModelId, Pageable paging);
   Page<DyModelPropDefEntity> findByDyModelIdAndRemoved(String dyModelId, RemovedEnum removed, Pageable paging);
   List<DyModelPropDefEntity> findByDyModelIdOrderBySeq(String dyModelId);
   List<DyModelPropDefEntity> findByDyModelIdAndRemovedOrderBySeq(String dyModelId, RemovedEnum removed);

}
